package ar.edu.itba.it.cg.grupo01.impl.shape;

import java.awt.Color;

import ar.edu.itba.it.cg.grupo01.api.shape.Shape;

import ar.edu.itba.it.cg.grupo01.impl.IntersectionFactory;

import static com.google.common.base.Preconditions.*;

public abstract class AbstractShape implements Shape {

	protected IntersectionFactory intersectionFactory;
	protected Color color;

	public AbstractShape(IntersectionFactory intersectionFactory) {
		this(intersectionFactory, null);
	}

	public AbstractShape(IntersectionFactory intersectionFactory, Color color) {

		this.intersectionFactory = checkNotNull(intersectionFactory,
				"Intersection factory should not be null");
		this.color = color;
	}

	@Override
	public Color getColor() {
		return color;
	}

	@Override
	public void setColor(Color color) {
		this.color = color;
	}

}
